const express = require('express')
const parser = require("body-parser")

const app = express()

app.use(parser.urlencoded({ extended: false }))

app.get('/index', (req, res) => {
    res.send("index")
})

app.post('/user', (req, res) => {
    console.log(req.body)
    console.log(req.body.name)
    res.send("user")
})

app.listen(8080, () => {
    console.log("服务器已经启动")
})